import { MATIC_CONTRACTS } from '../constants';

export const SAFE_FACTORY_NAME = 'Polymarket Contract Proxy Factory';

export const SAFE_FACTORY_ADDRESS =
  '0xaacFeEa03eb1561C4e67d661e40682Bd20E3541b';

export const SAFE_MULTISEND_ADDRESS =
  '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761';

// Constants from the contract
export const SAFE_TX_TYPEHASH =
  '0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8';
export const DOMAIN_SEPARATOR_TYPEHASH =
  '0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218';

export const usdcSpenders = [
  MATIC_CONTRACTS.conditionalTokens, // Conditional Tokens Framework
  MATIC_CONTRACTS.exchange, // CTF Exchange
  MATIC_CONTRACTS.negRiskExchange, // Neg Risk CTF Exchange
  MATIC_CONTRACTS.negRiskAdapter,
];

export const outcomeTokenSpenders = [
  MATIC_CONTRACTS.exchange, // CTF Exchange
  MATIC_CONTRACTS.negRiskExchange, // Neg Risk Exchange
  MATIC_CONTRACTS.negRiskAdapter, // Neg Risk Adapter
];

export const MASTER_COPY_ADDRESS = '0xE51abdf814f8854941b9Fe8e3A4F65CAB4e7A4a8'; // Example Gnosis Safe mastercopy

// You must use the SAME proxy creation code used in the factory
// This is GnosisSafeProxy creationCode (from the Safe repo)
export const PROXY_CREATION_CODE =
  '0x608060405234801561001057600080fd5b5060405161017138038061017183398101604081905261002f916100b9565b6001600160a01b0381166100945760405162461bcd60e51b815260206004820152602260248201527f496e76616c69642073696e676c65746f6e20616464726573732070726f766964604482015261195960f21b606482015260840160405180910390fd5b600080546001600160a01b0319166001600160a01b03929092169190911790556100e7565b6000602082840312156100ca578081fd5b81516001600160a01b03811681146100e0578182fd5b9392505050565b607c806100f56000396000f3fe6080604052600080546001600160a01b0316813563530ca43760e11b1415602857808252602082f35b3682833781823684845af490503d82833e806041573d82fd5b503d81f3fea264697066735822122015938e3bf2c49f5df5c1b7f9569fa85cc5d6f3074bb258a2dc0c7e299bc9e33664736f6c63430008040033';
